-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allocating SLH for http server with configuring httpHeapMaxBlocks in yaml #447
Conversation
h/httpserver.h
Outdated
@@ -220,6 +224,7 @@ typedef struct HTTPServerConfig_tag { | |||
hashtable *userTimeouts; | |||
hashtable *groupTimeouts; | |||
int defaultTimeout; | |||
unsigned int httpHeapMaxBlocks; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a more specific name; for example, httpRequestHeapMaxBlocks
.
@@ -5821,7 +5821,9 @@ static int httpHandleTCP(STCBase *base, | |||
} | |||
} | |||
#endif // USE_ZOWE_TLS | |||
ShortLivedHeap *slh = makeShortLivedHeap(READ_BUFFER_SIZE,100); | |||
HttpServer *server = (HttpServer*) module->data; | |||
unsigned int maxBlocks = server->config->httpRequestHeapMaxBlocks; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This field should probably be initialized by this point in the httpserver.c
code. The reason is, the httpserver.c
might be used by non-zss applications which don't know about this filed and might not initialize it.
b68d383
to
041d803
Compare
df35a61
to
041d803
Compare
… value. Signed-off-by: Gautham Kuppuswamy <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved
Proposed changes
The heap available to the http server is currently capped to around 6MB, because of this there is a limit in the size of the dataset that can be uploaded using ZSS API's.
To solve this, we are providing an option in configuration under 'components ->zss ->httpHeapMaxBlocks'. By default it would be 1024 meaning, 64KB * 1024, and as of now we have capped the max value of this option to be 4096 meaning, 64kb * 4096.
This PR addresses Issue: zowe/zss#698
This PR depends upon the following PRs:
Type of change
Please delete options that are not relevant.
PR Checklist
Please delete options that are not relevant.
Testing
You can try with uploading a dataset with size greater than 6mb using a python script